package com.lyrcsoft.service;

import com.lyrcsoft.entity.OrderEntity;
import java.util.ArrayList;
import java.util.List;
import org.springframework.stereotype.Component;

/**
 * 功能描述
 *
 * @author fujc-dev@qq.com
 * @date: 2023年08月24日 14:48
 */

@Component
public class OrderService {

    public List<OrderEntity> listByUserId(Integer userId) {
        List<OrderEntity> orderEntities = new ArrayList<>();
        OrderEntity orderEntity = new OrderEntity();
        orderEntity.setId(10001);
        orderEntity.setUserId(1);
        orderEntity.setCommodityCode("C000001457");
        orderEntity.setCount(10);
        orderEntity.setAmount(20);
        orderEntities.add(orderEntity);
        return orderEntities;
    }

    public List<OrderEntity> listByUserIdAndCommodityCode(Integer userId, String commodityCode) {
        List<OrderEntity> orderEntities = new ArrayList<>();
        OrderEntity orderEntity = new OrderEntity();
        orderEntity.setId(10001);
        orderEntity.setUserId(1);
        orderEntity.setCommodityCode("C000001457");
        orderEntity.setCount(10);
        orderEntity.setAmount(20);
        orderEntities.add(orderEntity);
        return orderEntities;
    }
}
